package com.sh.caryr.erp.entity.stock;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.sh.caryr.erp.entity.BaseEntity;
import com.sh.caryr.erp.entity.enums.SkuStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@TableName("erp_sku")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Sku extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Excel(name = "公司代码")
    private String coco;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long productId;

    private Long productSpecId;

    @Excel(name = "属性1")
    private String attribute1;

    @Excel(name = "属性2")
    private String attribute2;

    @Excel(name = "属性3")
    private String attribute3;

    @Excel(name = "属性4")
    private String attribute4;

    @Excel(name = "sku名称")
    private String name;

    @Excel(name = "code")
    private String code;

    private Float usableAmount = 0f;

    private Float notGoodAmount = 0f;

    private Float lockedAmount = 0f;

    /**
     * 1.Normal 2.Warning 3.Insufficient 4.Exceed
     */
    private SkuStatus status = SkuStatus.NORMAL;

    private Float purchasePrice;

    private Float salePrice;

    private String img;

    private Integer expiryDays;

    private transient String remark;
}
